package com.shf.dynamodb.entity;

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBDocument;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;

@DynamoDBTable(tableName = "ProductCatalogItem")
public class ProductCatalogItem {

    private Integer id;  //partition key
    private Pictures pictures;
    
    public ProductCatalogItem() {
	}
    
    public ProductCatalogItem(Integer id) {
		this.id=id;
	}
    
    @DynamoDBHashKey(attributeName="Id")  
    public Integer getId() { return id;}
    public void setId(Integer id) {this.id = id;}
        
    @DynamoDBAttribute(attributeName="Pictures")  
    public Pictures getPictures() { return pictures;}
    public void setPictures(Pictures pictures) {this.pictures = pictures;}
    
    @DynamoDBDocument
    public static class Pictures {
        private String frontView;
        private String rearView;
        private String sideView;
        
        @DynamoDBAttribute(attributeName = "FrontView")
        public String getFrontView() { return frontView; }
        public void setFrontView(String frontView) { this.frontView = frontView; }
        
        @DynamoDBAttribute(attributeName = "RearView")
        public String getRearView() { return rearView; }
        public void setRearView(String rearView) { this.rearView = rearView; }

        @DynamoDBAttribute(attributeName = "SideView")
        public String getSideView() { return sideView; }
        public void setSideView(String sideView) { this.sideView = sideView; }
        
		@Override
		public String toString() {
			return "Pictures [frontView=" + frontView + ", rearView=" + rearView + ", sideView=" + sideView + "]";
		}
        
     }

	@Override
	public String toString() {
		return "ProductCatalogItem [id=" + id + ", pictures=" + pictures + "]";
	}
    
    
}